package com.wl.service;

import com.wl.pojo.Comments;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @program: treeHole
 * @author: 吴磊
 * @create: 2021-07-06 18:16
 */
public interface CommentsService {


    Map<String, Object> getAllComments(HttpServletRequest request);

    /**
     * 用户进行评论
     *
     * @param request
     * @param comments
     * @return
     */
    Map<String, Object> insertComment(HttpServletRequest request, Comments comments);

    /**
     * 通过文章Id获取全部评论
     *
     * @param request
     * @param articleId
     * @return
     */
    Map<String, Object> getCommentByArticleId(HttpServletRequest request, String articleId);

    /**
     * 通过评论Id删除评论及子评论
     *
     * @param request
     * @param commentId
     * @return
     */
    Map<String, Object> deleteCommentsByCommentId(HttpServletRequest request, String commentId);


    /**
     * 给评论点赞或者取消点赞
     *
     * @param request
     * @param commentId
     * @return
     */
    Map<String, Object> commentUp(HttpServletRequest request, String commentId);

    /**
     * 通过用户自己的id查询自己文章下面的全部评论信息
     *
     * @param request
     * @return
     */
    Map<String, Object> getCommentManagementByUserId(HttpServletRequest request);


    /**
     * 获取自己所有的评论
     *
     * @param request
     * @return
     */
    Map<String, Object> getOwnerComments(HttpServletRequest request);
}
